<div>
    <div id="weibo-detail-{$feed.feed_id}" class="microblog-item ts-listen" data-listen="weibo-detail-{$feed.feed_id}" data-id="{$feed.feed_id}">
        <!-- header -->
        <div class="media m-i-header">
            <div class="pull-left m-i-h-avatar">
                <img class="media-object m-i-h-a-img" src="{$feed.avatar_small}"><php>if($feed['user_gicon']):</php><a href="javascript:;" title="{$feed['user_gicon']['user_group_name']}" class="group_icon_only"><img alt="{$feed['user_gicon']['user_group_name']}" src="{$feed['user_gicon']['user_group_icon_url']}" ></a><php>endif;</php>
            </div>
            <div class="media-body m-i-h-info">
                <div class="m-i-h-i-l-name">{$feed.uname}</div>
                <div class="m-i-h-i-l-description">{$feed['publish_time']|FriendlyDate}</div>
            </div>
            <div class="m-i-h-right"></div>
        </div>
        <!-- body -->
        <div class="m-i-body">
            <p class="m-i-b-p" id="m-i-b-p-{$feed.feed_id}">
                {$feed['content']}
            </p>
            <php>
                switch($feed['type']){
                case 'postimage':
                switch(count($feed['attach'])){
                case 1:
                $img_class='m-i-b-p-100';
                break;
                case 2:
                $img_class='m-i-b-p-50';
                break;
                default:
                $img_class='m-i-b-p';
                break;
                }
                echo '<div class="'.$img_class.' ts-listen" data-listen="weibo-detial-'.$feed['feed_id'].'">';
                foreach($feed['attach'] as $k => $v){
                //dump($v);
                if(count($feed['attach'])>=3){
                echo '<img src="'.$v['attach_small'].'" alt="" class="ts-listen" data-listen="weibo-pic-view" data-src="'.$v['attach_url'].'" data-index="'.$k.'"/>';
                }else{
                echo '<img src="'.$v['attach_middle'].'" alt="" class="ts-listen" data-listen="weibo-pic-view" data-src="'.$v['attach_url'].'" data-index="'.$k.'"/>';
                }
                }
                echo '</div>';
                break;
                case 'repost':
                echo '<div id="repost-'.$feed[feed_id].'" class="m-i-b-p m-i-b-p-repost ts-listen" data-listen="weibo-detail-'.$feed['api_source']['feed_id'].'"><span>'.$feed['transpond_data']['uname'].'</span>: '.$feed['transpond_data']['content'].'</div>';
                break;
                case 'repost-postimage':
                echo '<div id="repost-'.$feed[feed_id].'" class="m-i-b-p m-i-b-p-repost ts-listen" data-listen="weibo-detail-'.$feed['api_source']['feed_id'].'"><span>'.$feed['transpond_data']['uname'].'</span>: '.$feed['transpond_data']['content'];
                switch(count($feed['transpond_data']['attach'])){
                case 1:
                $img_class='m-i-b-p-100';
                break;
                case 2:
                $img_class='m-i-b-p-50';
                break;
                default:
                $img_class='m-i-b-p';
                break;
                }
                echo '<div class="'.$img_class.'">';
                    foreach($feed['transpond_data']['attach'] as $k => $v){
                    if(count($feed['transpond_data']['attach'])>=3){
                    echo '<img src="'.$v['attach_small'].'" alt="" class="ts-listen" data-listen="weibo-pic-view" data-src="'.$v['attach_url'].'" data-index="'.$k.'"/>';
                    }else{
                    echo '<img src="'.$v['attach_middle'].'" alt="" class="ts-listen" data-listen="weibo-pic-view" data-src="'.$v['attach_url'].'" data-index="'.$k.'"/>';
                    }
                    }
                    echo '</div></div>';
                break;
                case 'repost-removed':
                echo '<div id="repost-'.$feed[feed_id].'" class="m-i-b-p  m-i-b-p-repost"><span class="ts-listen" data-listen="weibo-userpage-'.$feed['transpond_data']['uid'].'">'.$feed['transpond_data']['uname'].'</span>: 这条分享不幸被删除了...</div>';
                break;
                case 'weiba_repost':
                echo '<p id="repost-'.$feed[feed_id].'" class="m-i-b-p  m-i-b-p-repost"><span class="ts-listen" data-listen="weibo-userpage-'.$feed['transpond_data']['uid'].'">'.$feed['transpond_data']['uname'].'</span>:'.$feed['api_source']['title'].'<p><p class="m-i-b-p">'.$feed['api_source']['content'].'<a href="'.$feed['api_source']['source_url'].'">link</a><p>';
                break;
                case 'weiba_repost-removed':
                //dump($feed['api_source']);
                echo '<p id="repost-'.$feed[feed_id].'" class="m-i-b-p  m-i-b-p-repost"><span class="ts-listen" data-listen="weibo-userpage-'.$feed['transpond_data']['uid'].'">'.$feed['transpond_data']['uname'].'</span>:'.$feed['api_source']['title'].'<p><p class="m-i-b-p">'.$feed['api_source']['content'].'<a href="'.$feed['api_source']['source_url'].'">link</a><p>';
                break;
                case 'postfile':
                echo '<div style="padding:0 0.75em;">';
                for($i=0;$i<count($feed['attach']);$i++){
                //dump($feed['attach'][$i]);
                    </php>
                    <a href="{:U('widget/Upload/down', array('attach_id'=>$feed['attach'][$i]['attach_id']))}" target="_blank" class="downloadbox">
                        <div class="pure-g">
                            <div class="d-name pure-u-3-4">{$feed['attach'][$i]['attach_name']}</div>
                            <div class="pure-u-1-4">
                                <span class="fa fa-download"></span>
                            </div>
                        </div>
                    </a>
                    <php>

                        }
                        echo '</div>';
                break;
                case 'repost-postfile':
                echo '<div style="padding:0 0.75em;">';
                //dump($feed['api_source']['attach']);
                for($i=0;$i<count($feed['api_source']['attach']);$i++){
                </php>
                <a href="{:U('widget/Upload/down', array('attach_id'=>$feed['api_source']['attach'][$i]['attach_id']))}" target="_blank" class="downloadbox">
                    <div class="pure-g">
                        <div class="d-name pure-u-3-4">{$feed['api_source']['attach'][$i]['attach_name']}</div>
                        <div class="pure-u-1-4">
                            <span class="fa fa-download"></span>
                        </div>
                    </div>
                </a>
                <php>
                    }
                    echo '</div>';
                break;
                case 'postvideo':
                if(preg_match("/(thinksns\.com)/i", $feed['flashvar'])){
                echo '<div class="m-i-b-p-video-box ts-listen" data-video="'.$feed['flashvar'].'" data-listen="weibo-video-view">';
                echo '<div class="playico fa fa-play"></div>';
                echo '<img src="'.$feed['flashimg'].'" alt="video" class="m-i-b-p-video-img"/>';
                echo '</div>';
                }
                break;
                case 'repost-postvideo':
                echo '<div id="repost-'.$feed[feed_id].'" class="m-i-b-p m-i-b-p-repost ts-listen" data-listen="weibo-detail-'.$feed['api_source']['feed_id'].'"><span>'.$feed['transpond_data']['uname'].'</span>: '.$feed['transpond_data']['content'];
                if(preg_match("/(thinksns\.com)/i", $feed['transpond_data']['flashvar'])){
                    echo '<div class="m-i-b-p-video-box ts-listen" data-video="'.$feed['transpond_data']['flashvar'].'" data-listen="weibo-video-view">';
                    echo '<div class="playico fa fa-play"></div>';
                    echo '<img src="'.$feed['transpond_data']['flashimg'].'" alt="video" class="m-i-b-p-video-img"/>';
                    echo '</div>';
                }
                echo '</div>';
                break;
                default:
                    //dump($feed['type']);
                break;
                }
                //dump($feed);
            </php>
        </div>
        <!-- footer -->
    </div>
    <div id="m-i-footer-{$feed.feed_id}" class="m-i-footer">
        <div class="pure-g" data-uname="{$feed.uname}" data-uid="{$feed.uid}">
            <div class="pure-u-1-4 ts-textcenter ts-listen" data-listen="weibo-list2retweet-{$feed.feed_id}" data-share="1" data-origin="{$feed.cancomment}" data-repost="{$feed['repost']}">
                <div class="weibo-item-btn weibo-item-btn-retweet"></div>
                <span class="ts-number">{$feed['repost_count']}</span>
            </div>
            <div class="pure-u-1-4 ts-textcenter ts-listen" data-listen="weibo-list2reply-{$feed.feed_id}" data-share="1" data-origin="{$feed.cancomment}" data-curorigin="{$feed.cancomment_current}" data-repost="{$feed['repost']}">
                <div class="weibo-item-btn weibo-item-btn-reply"></div>
                <span class="ts-number">{$feed['comment_count']}</span>
            </div>
            <div class="pure-u-1-4 ts-textcenter ts-listen" data-listen="weibo-list2digg-{$feed.feed_id}" data-isdig="{$feed['is_digg']}">
                <div class="weibo-item-btn weibo-item-btn-like"></div>
                <span class="ts-number">{$feed['digg_count']}</span>
            </div>
            <div class="pure-u-1-4 ts-textcenter ts-listen" data-listen="weibo-list2favorite-{$feed.feed_id}" data-isstar="{$feed['favorited']}" data-type="{$feed.app_row_table}">
                <php>
                    if($feed['favorited']==1){
                    $fa_star='fa-star';
                    }else{
                    $fa_star='fa-star-o';
                    }
                </php>
                <div class="weibo-item-btn weibo-item-btn-star"></div>
            </div>
        </div>
    </div>
</div>
